layui.use('upload', function(){
    var upload = layui.upload;

    //执行实例
    var uploadInst1 = upload.render({
        elem: "#test1" //绑定元素
        ,url: "/uploadfile" //上传接口
        ,done: function(res, index, upload){
            $("#demo1").attr("src",res.src);
        }
        ,error: function(){
            //请求异常回调
        }
    });

    var uploadInst2 = upload.render({
        elem: "#test2" //绑定元素
        ,url: "/uploadfile" //上传接口
        ,done: function(res, index, upload){
            $("#demo2").attr("src",res.src);
        }
        ,error: function(){
            //请求异常回调
        }
    });

    var uploadInst3 = upload.render({
        elem: "#test3" //绑定元素
        ,url: "/uploadfile" //上传接口
        ,done: function(res, index, upload){
            $("#demo3").attr("src",res.src);
        }
        ,error: function(){
            //请求异常回调
        }
    });

    var uploadInst4 = upload.render({
        elem: "#test4" //绑定元素
        ,url: "/uploadfile" //上传接口
        ,done: function(res, index, upload){
            $("#demo4").attr("src",res.src);
        }
        ,error: function(){
            //请求异常回调
        }
    });

    var uploadInst5 = upload.render({
        elem: "#test5" //绑定元素
        ,url: "/uploadfile" //上传接口
        ,done: function(res, index, upload){
            $("#demo5").attr("src",res.src);
        }
        ,error: function(){
            //请求异常回调
        }
    });

    var uploadInst6 = upload.render({
        elem: "#test6" //绑定元素
        ,url: "/uploadfile" //上传接口
        ,done: function(res, index, upload){
            $("#demo6").attr("src",res.src);
        }
        ,error: function(){
            //请求异常回调
        }
    });

});